﻿@model HitMapsNew.Models.EditDataModel
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/EditData/_EditLayout.cshtml";
}

<span ng-controller="EditMenusController">

    בחר תפריט:
    <div data-angular-treeview="true"
         data-tree-id="menuTree"
         data-tree-model="menuItems"
         data-node-id="ID"
         data-node-label="Name"
         data-node-children="Children">
    </div>

    <div id="addSubMenu">
        @using (Html.BeginForm("AddMenu", "EditData", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
        {
            <text>שם תת תפריט</text>
            <input type="hidden" name="ParnetID" value="{{menuTree.currentNode.ID}}" />
            @Html.TextBoxFor(m => m.SubMenuName, new { @class = "form-control" })
            
            <br />
            <text>שם תמונה</text>
            <input name="PictureName" ng-model="PictureName" placeholder="שם התמונה" />
            <img ng-src="~/Images/Google%20Maps%20Markers/{{PictureName}}.png" alt="תמונה" />
            <br />
            
            <button id="addSubMenu" type="submit">צור</button>
        }
    </div>
</span>

